package ar.edu.caece.compiler.grammar.terminals;

import ar.edu.caece.compiler.grammar.GrammarSymbol;
import ar.edu.caece.compiler.grammar.TokenVisitorInterface;
import ar.edu.caece.compiler.model.Token;

public abstract class GrammarTerminal implements GrammarSymbol{
	
	public abstract GrammarSymbol execute(TokenVisitorInterface visitor) throws Exception;
	
	private Token token;
	
	public GrammarTerminal(Token token) {
		this.token = token;
	}

	public void setToken(Token token) {
		this.token = token;
	}

	public Token getToken() {
		return token;
	}
	
	@Override
	public String getRepresentation() {
		return token.getLexema();
	}
}
